home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Programmer Disk
/
The Programmer Disk (Microforum).iso
/
xpro
/
basic1
/
pro24
/
basexec.doc
next >
Wrap
Text File
|
1987-11-12
|
4KB
|
98 lines
BASEXEC DOCUMENTATION
MOVBASV3 is a superb way to run BASICA on your clone and be true to the
original BASIC. But I've found that it causes major problems on exit with some
clones. Because SBASICA.COM replaces the BASICA interrupt vector (at
0000:0060) in the base page, some compiled BASIC programs lock up the machine
BIG TIME after you run SBASICA. To get around this problem, try the included
BASICA.EXE loader which 1) saves the BASICA interrupt vector, and 2) EXEC's
SBASICA.COM (or SBASIC.COM). When you exit SBASICA, this loader then restores
the BASIC interrupt vector. BASICA.EXE even passes along any arguments you
pass to BASICA (such as a filename or options like BASICA MENU /F:5).
If you run SBASICA.COM and experience no problems, then don't bother with
this process. If, however, you have to run compiled BASICA applications after
running SBASICA, and your machine DOES lock up, read on.
Running BASICA: (NOTE: Although you'll see BASICA and BASICA.COM, the same
procedures are available for BASIC. Just replace every occurrence of BASICA
with BASIC to use Disk based BASIC.COM instead of Advanced BASICA.COM)
QUICK START. If you always run BASICA from the current directory, then
extract BASICA.EXE and place it in the current directory, along with
SBASICA.COM. Now when you type BASICA, BASICA.EXE will run SBASICA.COM
automatically for you.
If you want BASIC available anywhere along your path, you have a bit more
work to do.
BASICA.EXE AVAILABLE ANYWHERE ON YOUR PATH. For this procedure, you need
to either patch the P-BASICA.EXE files provided or re-assemble BASICA.ASM.
I'll first discuss how to modify the ASM file and then, armed with that
understanding, I'll show you how to modify the EXE files.
MODIFYING BASICA.ASM. BASICA.EXE uses function call $4B to load and
execute a program. This is accomplished by calling COMMAND.COM to accomplish
the task, passing SBASICA.COM as a parameter to COMMAND.COM. The relevant
code is listed below:
# ___x:\path\filename___
| / \
v | |
COMMAND db 25,'/C C:\GAMES\SBASICA.com '
ComTail db 256 dup (0) ;Place for the command tail
db 13,0 ;syntax
PROGRAM db 'C:\COMMAND.COM',0 ;file to call
The currently installed path is C:\GAMES\SBASICA.COM. If will have
SBASICA in a subdirectory named GAMES, then just rename P-BASICA.EXE to
BASICA.EXE and move to the GAMES subdirectory and you are ready to go.
If you need to install another path, then
1. Change the drive\path to your desired path.
2. Change the # value to the length of the string between the quotes
plus 1. Be sure to include and count the space after COM.
Now reassemble using IBM's or Microsoft's Macro Assembler by typing:
MASM BASICA;
LINK BASICA;
Ignore the warning.
Now place this file, along with SBASICA.COM in the desired directory and
ensure you have a path to this directory. (Ensure that you do not have any
other files named BASICA.EXE, BASICA.BAT, BASICA.COM, etc., on your path
before the directory where you have loaded SBASICA.COM.)
MODIFYING BASICA.EXE: You can modify P-BASICA.EXE if you have a path that
is the same length as C:\GAMES\. To do so,
1. REName P-BASICA.EXE BASICA.XXX.
2. Type:
DEBUG BASICA.XXX.
3. Find the occurrence of C:\GAMES\SBASICA.COM (usually around
xxxx:0310). The xxxx value will vary from time to time.
4. Use the [E]xamine command to change the path to your desired path. If
you have extra room left over, then fill the extra bytes with spaces. For
example, if your desired path is:
C:\GA\SBASICA.COM then the completed patch will show the following
before you save it:
'C:\GA\SBASICA.COM '
^^^ extra spaces
5. Now [W]rite it back to disk and [Q]uit DEBUG.
6. REName BASICA.XXX BASICA.EXE and you are done.
If more extensive modifications are needed, then modify the ASM file and re-
assemble it.